SDSS Bright Stars Selection
Objective * Select bright and saturated stars within the Stripe82 region Steps # Select all the frames in Stripe82 SQL Tricks * Find information of Field and Run: (such as PSFwidth and Stripe number) JOIN Field AS f ON f.fieldid = fieldid JOIN Run AS r ON f.run = r.run WHERE r.stripe = 82 * Group and Order by type SELECT class, count(specobjid) as numObjs FROM SpecObj JOIN PlateX AS plate ON plate.plate = specObjAll.plate GROUP BY class, plate.plate.programname ORDER BY class * Using photometric flags (e.g, Saturated) SELECT objid, dbo.fPhotoFlagsN(flags) FROM Star WHERE (flags & (dbo.fPhotoFlags('SATURATED'))) = 0 * Select random sample (Using HTM index as random number generator) SELECT TOP 100 u, g, r, i, z FROM Galaxy WHERE (htmid*37 & 0x000000000000FFFF) < (650 * 1) -- Replace the "1" with a number < 99 to get a higher percentage data subsample Basics The following Views can be used to select bright stars and saturated stars: # [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=Star&t=V Star] #* The objects classified as stars from PhotoPrimary #** The Star view essentially contains the photometric parameters (no redshifts or spectroscopic parameters) for all primary point-like objects, including quasars. # [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=Star&t=V PhotoObj or PhotoObjAll] #* All primary and secondary objects in the PhotoObjAll table, which contains all the attributes of each photometric (image) object. # [http://skyserver.sdss3.org/public/en/help/browser/browser.asp thingIndex] #* Full list of all 'things': unique objects in the SDSS imaging #** Each row in this table corresponds to a single 'thing' observed by the SDSS imaging survey. By joining with the [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=detectionIndex&t=U 'detectionIndex'] table one can retrieve all of the observations of a particular thing. NOTE: The RA and Dec in this table refer to the DR8 coordinates, which have errors in the region north of 41 deg in Dec, since those were used for the resolving of the survey. These errors should have a very small effect on the decision about which objects are matched to each other. Useful Photometric Functions * [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fCalibStatus&t=F fCalibStatus]: Returns the CalibStatus flag value corresponding to a name * [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fCoordsFromEq&t=F fCoordsFromEq]: Returns table of stripe, lambda, eta, mu, nu derived from ra,dec * [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fDistanceArcMinEq&t=F fDistanceArcMinEq or fDistanceEq]: returns distance (arc minutes) between two points (ra1,dec1) and (ra2,dec2) Important Catalog References Useful Information from Photometric Catalogs: ** Index: objid, run, rerun, camcol, field, obj, mjd ** Position: ra, dec, raErr, decErr, b, l ** mode: 1: primary, 2: secondary, 3: other *** Useful function: [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fPhotoMode&t=F fPhotoMode], [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fPhotoModeN&t=F fPhotoModeN] ** type: Type classification of the object *** Including UNKNOWN=0; COSMIC_RAY=1; DEFECT=2; GALAXY=3; GHOST=4; KNOWNOBJ=5; STAR=6; SKY=8 *** Useful functions: [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fPhotoType&t=F fPhotoType], [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fPhotoTypeN&t=F fPhotoTypeN] ** clean: Clean photometry flag (1=clean, 0=unclean). ** probPSF, probPSF_u,g,r,i,z: Probability that the object is a star. ** insideMask: Flag to indicate whether object is inside a mask and why *** Including INMASK_NOT_IN_MASK; INMASK_BLEEDING; INMASK_BRIGHT_STAR; INMASK_TRAIL; INMASK_HOLE; INMASK_POOR_SEEING; INMASK_BAD_SEEING *** Useful function: [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fInsideMask&t=F fInsideMask], [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fInsideMaskN&t=F fInsideMaskN] ** flags, flags_u,g,r,i,z: Photo Object Attribute Flags *** Pay Attention to the Following ones: BRIGHT, EDGE, BLENDED, CHILD, NODEBLEND, NOPETRO, DEBLEND_TOO_MANY_PEAKS, COSMIC_RAY, SATURATED, SUBTRACTED, TOO_LARGE, SATUR_CENTER, INTERP_CENTER, PSF_FLUX_INTERP *** Useful functions: [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fPhotoFlags&t=F fPhotoFlags], [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fPhotoFlagsN&t=F fPhotoFlagsN] ** rowc, colc, rowcErr, colcErr, rowc_u,g,r,i,z, colc_u,g,r,i,z ** psfMag_u,g,r,i,z; psfMagErr_u,g,r,i,z, in mag ** psfFlux_u,g,r,i,z in nanomaggies; and psfFluxIvar_u,g,r,i,z in nanomaggies^{-2} ** aperFlux7_u,g,r,i,z; aperFlux7Ivar_u,g,r,i,z: Aperture flux and Inverse variance of aperture flux within 7.3 arcsec ** extinction_u,g,r,i,z: Extinction in each band ** psffwhm_u,g,r,i,z: FWHM in each band ** airmass_u,g,r,i,z: Airmass at time of observation in each band ** fieldID: Link to the field this object is in ** thingID, nObserve, nDetect, nEdge ** score: Quality of field (0-1) ** calibStatus_u,g,r,i,z: Calibration status *** Including: PHOTOMETRIC, UNPHOT_OVERLAP, UNPHOT_EXTRAP_CLEAR, UNPHOT_EXTRAP_CLOUDY, UNPHOT_DISJOINT, INCREMENT_CALIB *** Useful functions: [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fCalibStatus&t=F fCalibStatus], [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fCalibStatusN&t=F fCalibStatusN] ** nMgyPerCount_u,g,r,i,z: in nMgy/count ** TAI_u,g,r,i,z: time of observation (TAI) in each filter Useful Information from [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=Field&t=U Field] catalog ** Index: fieldID, run, rerun, camcol, field ** Number of Objects: nTotal, nObjects, nChild, nGalaxy, nStars ** Number of Bright Objects: nBrightObj_u,g,r,i,z ** quality: Quality of the field *** Including BAD, ACCEPTABLE, GOOD, MISSING, HOLE *** Useful function: [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fFieldQuality&t=F fFieldQuality], [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fFieldQualityN&t=F fFieldQualityN] ** Astrometry terms: a,b,c,d,e,f in _u,g,r,i,z ** Center of the field: ra, dec ** Min and Max Ra/Dec: raMin, raMax, decMin, decMax ** Pixel scalte: pixScale in arcsec/pix ** Saturation level: saturationLevel_u,g,r,i,z in counts ** Effective area of PSF: nEffPsf_u,g,r,i,z in pix ** Sky Estimate from Postage Stamp Pipeline: skyPsp_u,g,r,i,z in nmgy/arcsec^2 ** Frames sky value: skyFrames_u,g,r,i,z in nmgy/arcsec^2 ** Sigma of pixel values: sigPix_u,g,r,i,z in nmgy/arcsec^2 ** Fractional Sigma of Sky Value Distribution: skySig_u,g,r,i,z in mag *** Noise_{Sky}=skySig\times sky\times ln(10)/2.5 ** Error in PSP estimate of sky: skyErr_u,g,r,i,z, in nmgy/arcsec^2 ** Rate of change in sky value along columns: skySlope_u,g,r,i,z, in nmgy/arcsec^2/field ** Number of bins in PSF profile (in fieldProfile table): nProf_u,g,r,i,z ** Number of stars used in PSF measurement: psfNStar_u,g,r,i,z ** Photometric uncertainty due to imperfect PSF model: psfApCorrectionErr_u,g,r,i,z, in mag ** Inner gaussian sigma for composite fit: psfSigma1_u,g,r,i,z ** Outer gaussian sigma for composite fit: psfSigma2_u,g,r,i,z ** Ratio of inner to outer components at origin: psfB_u,g,r,i,z ** Value of power law at origin in composite fit: psfP0_u,g,r,i,z ** Slope of power law in composite fit: psfBeta_u,g,r,i,z ** Width of power law in composite fit: psfSigmaP_u,g,r,i,z ** Effective PSF width from 2-Gaussian fit: psfWidth_u,g,r,i,z, in arcsec ** Sigma of inner gaussian in 2-Gaussian fit: psf2GSigma1_u,g,r,i,z, in arcsec ** Sigma of outer gaussian in 2-Gaussian fit: psf2GSigma2_u,g,r,i,z, in arcsec ** Ratio of inner to outer components at origin: osf2GB_u,g,r,i,z ** Gain averaged over amplifiers: gain_u,g,r,i,z ** Dark variance: darkVariance_u,g,r,i,z ** Quality of field: score, from 0 to 1 ** nanomaggies per count due to instrument: aterm_u,g,r,i,z, in nmgy/count ** atmospheric k-term at reference time in calibration: kterm_u,g,r,i,z ** Calibration status bitmask: calibStatus_u,g,r,i,z ** Image status bitmask: imageStatus_u,g,r,i,z ** nanomaggies per count: nMgyPerCount_u,g,r,i,z, in nmgy/count ** Start and End of Field in Stripe coords, muStart, muEnd, nuStart, nuEnd, in arcsec Useful Information in [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=FieldProfile&t=U FieldProfile] ** Filter: band, u,g,r,i,z=0,1,2,3,4 ** Bin Number: bin, from 0 to 14 ** Mean pixel flux in annulus: profMean, in nmgy/arcsec^2 ** Median profile: profMed, in nmgy/arcsec^2 ** Sigma of profile: profSig, in nmgy/arcsec^2 ** Links to the field object: fieldID ** For the profile radii, see the [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=ProfileDefs&t=U ProfileDefs] table. *** bin, cell, sinc, see definition Here *** rInner, rOuter, in arcsec *** aAnn, aDisk, in arcsec^2 Useful Information in the [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=Neighbors&t=U Neighbors] catalog ** objid, NeighborObjID ** Distance between center and neighbor: distance, in arcmins ** type, neighborType ** mode, neighborMode Useful Information in [http://skyserver.sdss3.org/public/en/help/browser/browser.asp?n=Run&t=U RUN] Catalog ** Index: run, rerun, mjd, datestring, stripe, strip ** node, incl Useful Information in Frame catalog ** Index: fieldID, run, rerun, camcol, field, stripe, strip ** Astrometry: a, b, c, d, e, f, node, incl ** Region: raMin, raMax, decMin, decMax ** Center: mu, nu, ra, dec, cx, cy, cz, htmid ** JPEG Image: img *** To use it, see [http://skyserver.sdss3.org/public/en/help/browser/description.asp?n=fGetUrlFrameImg&t=F fGetUrlFrameImg] *** dbo.fGetUrlFrameImg( @frameId, @zoom )